<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@include file="/common/common.jsp"%>
<%@include file="/common/skins/skin0/component.jsp" %>
<h:css href="/css/style1/style-custom.css"/>
<%--
- Author(s): pengweiling
- Date: 2012-07-11 01:52:46
- Description:
--%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>
      选择WeTasksV
    </title>
  </head>
  <body>
    <e:datasource name="criteria" type="entity" path="com.primeton.das.criteria.criteraiType" />
    <e:datasource name="page" type="entity" path="com.eos.foundation.PageCond" />
    <queryform id= "e7776a63-2f6c-4684-8434-25beecb9eb6d">
      <h:form  name="query_form" action="com.hms.OrderMgr.WeTasksVSelect.flow" checkType="blur" target="_self" method="post" onsubmit="return checkForm(this);">
        <input type="hidden" name="_eosFlowAction" value="query"/>
        <h:hidden property="criteria/_expr[1]/iorderid"/>
        <h:hidden property="criteria/_expr[1]/_op" value="="/>
      </h:form>
    </queryform>
    <br/>
    <viewlist id= "12cecee5-5563-40bb-9a7b-37a43f777d93">
      <h:form name="page_form" action="com.hms.OrderMgr.WeTasksVSelect.flow" method="post">
        <input type="hidden" name="_eosFlowAction" value="query" >
        <h:hiddendata property="criteria" />
        <h:hidden property="page/begin"/>
        <h:hidden property="page/length"/>
        <h:hidden property="page/count"/>
        <h:hidden property="page/isCount"/>

          <table align="center" border="0" width="100%" class="EOS_table">
            <tr>
              <th>
                序号
              </th>
              <th>
                任务名称
              </th>
              <th>
                状态
              </th>
              <th>
                订单编号
              </th>
              <th>
                处理人
              </th>
              <th>
                处理结果
              </th>
              <th>
                审批意见
              </th>
              <th>
                提交时间
              </th>
              <th>
                结束时间
              </th>
            </tr>
            <w:radioGroup id="group1">
              <l:iterate property="wetasksvs" id="id1">
                <tr class="<l:output evenOutput='EOS_table_row' />">
                  <td>
                    <b:write iterateId="id1" property="nstepno"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="cstepname"/>
                  </td>
                  <td>
                      <l:equal property="cstatus" iterateId="id1" targetValue="TODO">
                         待处理
                      </l:equal>  
                      <l:equal property="cstatus" iterateId="id1" targetValue="COMPLETE">
                         处理完毕
                      </l:equal>  
                  </td>
                  <td>
                      <l:empty property="corderno" iterateId="id1">
                        <b:write iterateId="id1" property="iorderid"/>
                      </l:empty>
                      <l:notEmpty property="corderno" iterateId="id1">
                        <b:write iterateId="id1" property="corderno"/>
                      </l:notEmpty>  
                  </td>
                  <td>
                    <b:write iterateId="id1" property="operatorname"/>
                  </td>
                  <td>
                    <l:equal property="aciton" iterateId="id1" targetValue="STARTUP">
                     发起流程
                    </l:equal>
                    <l:equal property="aciton" iterateId="id1" targetValue="REJECT">
                     驳回
                    </l:equal>
                    <l:equal property="aciton" iterateId="id1" targetValue="APPROVE">
                     审批
                    </l:equal>
                    <l:equal property="aciton" iterateId="id1" targetValue="CANCEL">
                     取消订单
                    </l:equal>                    
                  </td>
                  <td>
                    <b:write iterateId="id1" property="advise"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="dcreated"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="dmodified"/>
                  </td>
                </tr>
              </l:iterate>
            </w:radioGroup>
            <tr>
              <td colspan="10" class="command_sort_area">
                <div style="float:left">
                <input type="button" value="关闭" onclick="window.close();" class="button">
                </div>
                <div style="float:right">
                  <l:equal property="page/isCount" targetValue="true">
                    共
                    <b:write property="page/count"/>
                    条记录 第
                    <b:write property="page/currentPage"/>
                    页/
                    <b:write property="page/totalPage"/>
                    页
                  </l:equal>
                  <l:equal property="page/isCount" targetValue="false">
                    第
                    <b:write property="page/currentPage"/>
                    页
                  </l:equal>
                  <input type="button" onclick="firstPage('page', 'query', null, null, 'page_form');" value="首页"  <l:equal property="page/isFirst" targetValue="true">disabled</l:equal> >
                  <input type="button" onclick="prevPage('page', 'query', null, null, 'page_form');" value="上页" <l:equal property="page/isFirst" targetValue="true">disabled</l:equal> >
                  <input type="button" onclick="nextPage('page', 'query', null, null, 'page_form');" value="下页" <l:equal property="page/isLast" targetValue="true">disabled</l:equal> >
                  <l:equal property="page/isCount" targetValue="true">
                    <input type="button" onclick="lastPage('page', 'query', null, null, 'page_form');" value="尾页" <l:equal property="page/isLast" targetValue="true">disabled</l:equal> >
                  </l:equal>
                </div>
              </td>
            </tr>
          </table>

      </h:form>
    </viewlist>
    <script>
      window.resize(800, 380);
      window.moveCenter();
      function selectRecord()
      {
        var g = $id("group1");
        if (g.getSelectRow() == null) {
          alert("请选择一行记录");
          return;
        }
        var ret = new Array;
        window.returnValue = ret;
        window.close();
      }

      function unSelectRecord()
      {
        var ret = new Array;
        ret[0] = "";
        ret[1] = "";
        window.returnValue = ret;
        window.close();
      }
    </script>
  </body>
</html>
